﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/Main.Master" AutoEventWireup="true"
    CodeBehind="ServiceCategory.aspx.cs" Inherits="AUV5.Web.Manage.ServiceCategory" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h3>
        服务类别
    </h3>
    <fieldset>
        <p>
            类别名称：<asp:TextBox ID="TextBoxCategoryName" runat="server" />&nbsp;位置(插入到所选项之前)&raquo;
            <asp:DropDownList ID="ddlCategory" runat="server">
            </asp:DropDownList>
        </p>
        <p>
            标识颜色：<asp:TextBox ID="txtColor" Text="#" runat="server" />
            <asp:Button ID="ButtonAddCategory" Text="添加类别" runat="server" OnClick="ButtonAddCategory_Click" />
        </p>
    </fieldset>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <td>
                类别名称：
            </td>
            <td>
                状态
            </td>
            <td style="width: 50px">
                标识颜色
            </td>
            <td>
                添加时间
            </td>
            <td align="right">
                管理
            </td>
        </tr>
        <asp:Repeater ID="RepeaterServiceCategory" runat="server" OnItemCommand="RepeaterServiceCategory_ItemCommand">
            <ItemTemplate>
                <tr>
                    <td>
                        <%# (Container.DataItem as AUV5.Model.ServiceCategory).CategoryName  %>
                    </td>
                    <td>
                        <%# (Container.DataItem as AUV5.Model.ServiceCategory).IsDel == 0 ? "启用" : "<span class='error'>禁用</span>"%>
                    </td>
                    <td align="center">
                        <span style="width: 40px; height: 20px; background-color: <%#(Container.DataItem as AUV5.Model.ServiceCategory).Color%>">
                            <%#(Container.DataItem as AUV5.Model.ServiceCategory).Color%></span>
                    </td>
                    <td>
                        <%# (Container.DataItem as AUV5.Model.ServiceCategory).CreateDate.ToString("yyyy.MM.dd")  %>
                    </td>
                    <td class="action">
                        <asp:LinkButton CommandName='<%# (Container.DataItem as AUV5.Model.ServiceCategory).IsDel == (int)AUV5.Common.Enum.auvDel.NotDel ? "Disable" : "Enable"%>'
                            CommandArgument="<%# (Container.DataItem as AUV5.Model.ServiceCategory).CategoryID  %>"
                            class="view" Text='<%# (Container.DataItem as AUV5.Model.ServiceCategory).IsDel == (int)AUV5.Common.Enum.auvDel.NotDel ? "禁用" : "启用"%>'
                            runat="server" />
                        <a href="ServiceCategory.aspx?categoryID=<%#(Container.DataItem as AUV5.Model.ServiceCategory).CategoryID%>"
                         <%# (Container.DataItem as AUV5.Model.ServiceCategory).IsDel == (int)AUV5.Common.Enum.auvDel.NotDel ? "" : "style='display:none'"%>
                            class="edit">编辑</a>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>
</asp:Content>
